/*
 * OfferPushProcess.java
 * business
 *
 * Created by ChenTao on 2016/10/31.
 *
 * Copyright (c) 2016年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.data.push.process;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;

import com.yidiandao.business.constant.Intents;
import com.yidiandao.business.data.bean.Message;
import com.yidiandao.business.data.push.AbsPushProcess;
import com.yidiandao.business.ui.userabout.wanttobuy.detail.UserPostedWantToBuyDetailActivity;

/**
 * 新的报价信息推送
 */
public class OfferPushProcess extends AbsPushProcess {

    public OfferPushProcess(Context context, Message message, boolean isForeground) {
        super(context, message, isForeground);
    }

    @Override
    protected void addExtraDataToNotificationClickReceiverIntent(Intent intent) {
        // 添加跳转到求购详情的Intent
        intent.putExtra(Intents.EXTRA_WANT_ID, mMessage.getWantId());
    }

    @Override
    public Intent getClickNotificationJumpActivityIntent() {
        return new Intent(mContext, UserPostedWantToBuyDetailActivity.class);
    }

    @Override
    public void onDialogEnsureButtonClick(Message message) {
        // 去个人中心求购详情页面
        UserPostedWantToBuyDetailActivity.actionStart((Activity) mContext, message.getWantId());
    }
}
